package com.xmy.cultivate.entity;

import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * <p>
 * 学生请假申请表
 * </p>
 *
 * @author hpiggy
 * @since 2024-11-10
 */
@TableName("student_leave_apply")
@ApiModel(value = "StudentLeaveApply对象", description = "学生请假申请表")
@Data
public class StudentLeaveApply implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;

    @ApiModelProperty("年份")
    private Integer yearPart;

    @ApiModelProperty("学期")
    private Integer quarterNum;

    @ApiModelProperty("学生id")
    private Long studentId;

    @ApiModelProperty("请假日期")
    private LocalDate schoolDate;

    @ApiModelProperty("开始时段")
    private String timeStart;

    @ApiModelProperty("截止时段")
    private String timeEnd;

    @ApiModelProperty("班级id")
    private Long gradeId;

    @ApiModelProperty("开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startDateTime;

    @ApiModelProperty("截止时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endDateTime;

    @ApiModelProperty("排课id（course_scheduling_detail排课表id）")
    private Long schedulingDetailId;

    @ApiModelProperty("0审核中，1审核通过，2审核失败")
    private Integer status;

    @ApiModelProperty("请假原因")
    private String leaveReason;

    @ApiModelProperty("审核老师id")
    private Long auditTeacherId;


    @ApiModelProperty("拒绝原因")
    private String refuseReason;

    @TableField(fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("审核时间")
    private LocalDateTime auditDateTime;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;

    @ApiModelProperty("科目id")
    private Long  subjectsId;
}
